Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Getting Information About Compressed Data


GetSimilarity

The GetSimilarity function compares a compressed image to a picture stored in a pixel map and returns a value indicating the relative similarity of the two images.

pascal OSErr GetSimilarity (PixMapHandle src, const Rect *srcRect,
                            ImageDescriptionHandle desc, Ptr data,
                            Fixed *similarity);
src
Contains a handle to the noncompressed image. The image must be stored in a pixel map structure.
srcRect
Contains a pointer to a rectangle defining the portion of the image to compare to the compressed image. This rectangle should be the same size as the image described by the image description structure specified by the desc parameter.
desc
Specifies a handle to the image description structure that defines the compressed image for the operation.
data
Points to the compressed image data. This pointer must contain a 32-bit clean address.
similarity
Contains a pointer to a field that is to receive the similarity value. The compressor sets this field to reflect the relative similarity of the two images. Valid values range from 0 (completely different) to 1.0 (identical).
RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
memFullErr-108Not enough memory available
noCodecErr-8961The Image Compression Manager could not find the specified compressor

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996